﻿<template id="@(ViewBag.PageTemplate)">
    <div class="layout-page-content">
        <single_table :api="`${path}/getservicesinfo`" :border="true" row-key="name" ref="tableRef">
            <template #header-left="scope">@(Html.Raw(ViewBag.PageFuncs("tools")))</template>
            <template #default>

                <el-table-column prop="name" label="业务模块名称" width="250" align="center"></el-table-column>
                <el-table-column prop="fullName" label="项目路径"></el-table-column>

                <single_table_operation>
                    <template #default="scope">@(Html.Raw(ViewBag.PageFuncs("table")))</template>
                </single_table_operation>
            </template>
        </single_table>
    </div>
</template>
<script type="text/javascript">
    var @(ViewBag.PageName) = {
        template: "#@(ViewBag.PageTemplate)", data() {
            return {
                path: "@(ViewBag.PagePath)"
            }
        },
        methods: {
            init(){
                var that = this;
            },
            refresh(){
                this.$refs.tableRef.loadData();
            },
            generate(name){
                app.func.longAjaxDo(`${this.path}/dogenerateservice`, { name }, "正在生成项目，预计需要【30秒】请稍后...");
            }
        },
        mounted() { this.init(); }
    };
</script>